package com.tql.test_13;
/*
* 懒汉式(线程不安全)：
* 使用在创建
* */
public class LazyTest1 {
    private static LazyTest1 lazyTest1;
    private LazyTest1(){};
    public static LazyTest1 getInstance(){
        //多线程下，可能多个线程经过if判断，创建个对象实例
        if(lazyTest1==null){
           lazyTest1=new LazyTest1();
        }
        return lazyTest1;
    }
}
